home *** CD-ROM | disk | FTP | other *** search
/ Aminet 30 / Aminet 30 (1999)(Schatztruhe)[!][Apr 1999].iso / Aminet / dev / e / UnfinishedEsrc.lha / PROJECTS / pc.e < prev    next >
Text File  |  1999-01-06  |  9KB  |  304 lines

  1. ->By Ian Chapman
  2. ->Spoof PC Emulator - Don't ask why! :)
  3. ->You need the IBM5 Font in your Fonts: dir
  4. ->You need newsgothic Font in your Fonts: dir
  5. ->Expects a SCREEN SIZE of at least 640x480
  6.  
  7. MODULE  'reqtools',
  8.         'libraries/reqtools',
  9.         'dos/dos',
  10.         'intuition/screens',
  11.         'diskfont',
  12.         'libraries/diskfont',
  13.         'graphics/text'
  14. ->        'tools/easysound'
  15.  
  16. DEF req:PTR TO rtscreenmoderequester,
  17.     ret,
  18.     font,
  19.     fontatts,
  20.     scr:PTR TO screen
  21. ->    beep:esound,
  22. ->    tick:esound
  23.  
  24. PROC main()
  25.  
  26. ->loadraw('beep.raw',beep)
  27. ->loadraw('tick.raw',tick)
  28.  
  29.  
  30.  
  31. IF (diskfontbase:=OpenLibrary('diskfont.library',39))<>NIL
  32.  
  33.  
  34.     IF (reqtoolsbase:=OpenLibrary('reqtools.library',37))<>NIL
  35.  
  36.         req:=RtAllocRequestA(RT_SCREENMODEREQ,NIL)
  37.  
  38.         IF (ret:=RtScreenModeRequestA(req,'Select Screenmode',[RT_REQPOS,REQPOS_POINTER,NIL,NIL]))<>NIL
  39.  
  40.             IF (scr:=OpenScreenTagList(0,[SA_DEPTH,req.displaydepth,
  41.                                           SA_DISPLAYID,req.displayid,
  42.                                           SA_SHOWTITLE,NIL,
  43.                                           SA_WIDTH,req.displaywidth,
  44.                                           SA_HEIGHT,req.displayheight,
  45.                                           0,0]))<>NIL
  46.  
  47.                 SetRGB4(scr.viewport,0,$0,$0,$0)
  48.                 SetRGB4(scr.viewport,1,$0,$0,$0)
  49.                 SetRGB4(scr.viewport,2,$0,$0,$0)
  50.                 SetRGB4(scr.viewport,3,$FF,$FF,$FF)
  51.                 SetAPen(scr.rastport,3)
  52.                 ->Main Program code
  53.  
  54.                 Move(scr.rastport,10,20)
  55.  
  56.                 fontatts:=['Ibm5.font',8,0,0]:textattr
  57.                 font:=OpenDiskFont(fontatts)
  58.                 SetFont(scr.rastport,font)
  59.                 Text(scr.rastport,'AMIBIOS (c) 1996 PnP 3.2i',25)
  60.                 Delay(50)
  61.  
  62.                 Move(scr.rastport,10,30)
  63.                 Text(scr.rastport,'American Megatrends Inc.,',25)
  64.                 Delay(30)
  65.  
  66.                 Move(scr.rastport,10,40)
  67.                 Text(scr.rastport,'RELEASE 11/26/97',16)
  68.                 Delay(30)
  69.  
  70.                 Move(scr.rastport,10,60)
  71.                 Text(scr.rastport,'Main Processor : PENTIUM-MMX',28)
  72.                 Move(scr.rastport,10,70)
  73.                 Text(scr.rastport,'Processor Clock: 166Mhz',23)
  74.                 Delay(50)
  75.  
  76.                 Move(scr.rastport,10,90)
  77.                 Text(scr.rastport,'Checking NVRAM...',17)
  78.                 Delay(30)
  79.  
  80.                 Move(scr.rastport,10,100)
  81.                 Text(scr.rastport,'  640KB OK',10)
  82.                -> playsound(tick,30000,[1,2,4,8]:CHAR)
  83.                 Delay(5)
  84.  
  85.                 Move(scr.rastport,10,100)
  86.                 Text(scr.rastport,' 1024KB OK',10)
  87.                -> playsound(tick,30000,[1,2,4,8]:CHAR)
  88.                 Delay(5)
  89.  
  90.                 Move(scr.rastport,10,100)
  91.                 Text(scr.rastport,' 2048KB OK',10)
  92.                -> playsound(tick,30000,[1,2,4,8]:CHAR)
  93.                 Delay(5)
  94.  
  95.                 Move(scr.rastport,10,100)
  96.                 Text(scr.rastport,' 3072KB OK',10)
  97.                -> playsound(tick,30000,[1,2,4,8]:CHAR)
  98.                 Delay(5)
  99.  
  100.                 Move(scr.rastport,10,100)
  101.                 Text(scr.rastport,' 4096KB OK',10)
  102.                -> playsound(tick,30000,[1,2,4,8]:CHAR)
  103.                 Delay(5)
  104.  
  105.                 Move(scr.rastport,10,100)
  106.                 Text(scr.rastport,' 5120KB OK',10)
  107.                -> playsound(tick,30000,[1,2,4,8]:CHAR)
  108.                 Delay(5)
  109.  
  110.                 Move(scr.rastport,10,100)
  111.                 Text(scr.rastport,' 6144KB OK',10)
  112.                -> playsound(tick,30000,[1,2,4,8]:CHAR)
  113.                 Delay(5)
  114.  
  115.                 Move(scr.rastport,10,100)
  116.                 Text(scr.rastport,' 7168KB OK',10)
  117.               ->  playsound(tick,30000,[1,2,4,8]:CHAR)
  118.                 Delay(5)
  119.  
  120.                 Move(scr.rastport,10,100)
  121.                 Text(scr.rastport,' 8192KB OK',10)
  122.               ->  playsound(tick,30000,[1,2,4,8]:CHAR)
  123.                 Delay(5)
  124.  
  125.                 Move(scr.rastport,10,100)
  126.                 Text(scr.rastport,' 9216KB OK',10)
  127.               ->  playsound(tick,30000,[1,2,4,8]:CHAR)
  128.                 Delay(5)
  129.  
  130.                 Move(scr.rastport,10,100)
  131.                 Text(scr.rastport,'10240KB OK',10)
  132.               ->  playsound(tick,30000,[1,2,4,8]:CHAR)
  133.                 Delay(5)
  134.  
  135.                 Move(scr.rastport,10,100)
  136.                 Text(scr.rastport,'11264KB OK',10)
  137.               ->  playsound(tick,30000,[1,2,4,8]:CHAR)
  138.                 Delay(5)
  139.  
  140.                 Move(scr.rastport,10,100)
  141.                 Text(scr.rastport,'12288KB OK',10)
  142.               ->  playsound(tick,30000,[1,2,4,8]:CHAR)
  143.                 Delay(5)
  144.  
  145.                 Move(scr.rastport,10,100)
  146.                 Text(scr.rastport,'13312KB OK',10)
  147.               ->  playsound(tick,30000,[1,2,4,8]:CHAR)
  148.                 Delay(5)
  149.  
  150.                 Move(scr.rastport,10,100)
  151.                 Text(scr.rastport,'14336KB OK',10)
  152.               ->  playsound(tick,30000,[1,2,4,8]:CHAR)
  153.                 Delay(5)
  154.  
  155.                 Move(scr.rastport,10,100)
  156.                 Text(scr.rastport,'15360KB OK',10)
  157.               ->  playsound(tick,30000,[1,2,4,8]:CHAR)
  158.                 Delay(5)
  159.  
  160.                 Move(scr.rastport,10,100)
  161.                 Text(scr.rastport,'16384KB OK',10)
  162.               ->  playsound(tick,30000,[1,2,4,8]:CHAR)
  163.                 Delay(80)
  164.  
  165.                 Move(scr.rastport,10,100)
  166.                 Text(scr.rastport,'WAIT...   ',10)
  167.               ->  playsound(beep,20000,[1,2,4,8]:CHAR)
  168.                 Delay(100)
  169.               ->  clearsound(beep)
  170.               ->  clearsound(tick)
  171.  
  172.                 Move(scr.rastport,10,110)
  173.                 Text(scr.rastport,'Press <DEL> to enter setup.',27)
  174.                 Delay(50)
  175.  
  176.                 Move(scr.rastport,10,130)
  177.                 Text(scr.rastport,'Pri Master: ST44431A',20)
  178.                 Delay(80)
  179.  
  180.                 Move(scr.rastport,10,140)
  181.                 Text(scr.rastport,'Pri Slave : HITACHI CDROM',25)
  182.                 Delay(30)
  183.  
  184.                 Move(scr.rastport,10,160)
  185.                 Text(scr.rastport,'Starting MS-DOS...',18)
  186.                 Delay(200)
  187.  
  188.                 prompt(10,200)
  189.  
  190.                 cursor(20,40,200)
  191.  
  192.                 Move(scr.rastport,40,200)
  193.                 Text(scr.rastport,'win',3)
  194.  
  195.                 cursor(6,63,200)
  196.  
  197.                 cursor(10,10,210)
  198.  
  199.                 Move(scr.rastport,10,210)
  200.                 Text(scr.rastport,'This program requires Microsoft Windows.',40)
  201.  
  202.                 cursor(10,330,210)
  203.  
  204.                 prompt(10,240)
  205.  
  206.                 cursor(20,40,240)
  207.  
  208.                 Move(scr.rastport,40,240)
  209.                 Text(scr.rastport,'D:',2)
  210.  
  211.                 cursor(6,53,240)
  212.  
  213.                 Move(scr.rastport,10,250)
  214.                 Text(scr.rastport,'Invalid Drive Specification.',28)
  215.  
  216.                 cursor(6,230,250)
  217.  
  218.                 prompt(10,280)
  219.  
  220.                 cursor(10,40,280)
  221.  
  222.                 Move(scr.rastport,40,280)
  223.                 Text(scr.rastport,'ARGHHHHH!',9)
  224.  
  225.                 cursor(5,110,280)
  226.  
  227.                 Move(scr.rastport,10,290)
  228.                 Text(scr.rastport,'Bad Command',12)
  229.  
  230.                 prompt(10,330)
  231.                 cursor(10,40,330)
  232.  
  233.                 Move(scr.rastport,0,0)
  234.                 ClearScreen(scr.rastport)
  235.  
  236.                 CloseFont(font)
  237.  
  238.                 SetRGB4(scr.viewport,3,$FF,$E5,$b5)
  239.  
  240.                 fontatts:=['NewsGothic.font',56,0,0]:textattr
  241.                 font:=OpenDiskFont(fontatts)
  242.  
  243.                 SetFont(scr.rastport,font)
  244.  
  245.                 Move(scr.rastport,140,150)
  246.                 Text(scr.rastport,'It is now safe',14)
  247.  
  248.                 Move(scr.rastport,160,200)
  249.                 Text(scr.rastport,'to switch off',13)
  250.  
  251.                 Move(scr.rastport,140,250)
  252.                 Text(scr.rastport,'your computer.',14)
  253.  
  254.                 Delay(200)
  255.  
  256.                 CloseFont(font)
  257.  
  258.  
  259.  
  260.                 CloseScreen(scr)
  261.  
  262.             ELSE
  263.                 PrintF('Unable to open screen!\n')
  264.             ENDIF
  265.  
  266.             RtFreeRequest(req)
  267.  
  268.         ELSE
  269.             PrintF('Unable to allocate screenmode requester!\n')
  270.         ENDIF
  271.  
  272.         CloseLibrary(reqtoolsbase)
  273.  
  274.     ELSE
  275.         PrintF('Unable to open reqtools.library V37+\n')
  276.     ENDIF
  277.  
  278.     CloseLibrary(diskfontbase)
  279.  
  280. ELSE
  281.     PrintF('Unable to open diskfont.library V39+\n')
  282. ENDIF
  283.  
  284. ENDPROC
  285.  
  286. PROC cursor(times,xpos,ypos)
  287. DEF x
  288.  
  289. FOR x:=1 TO times
  290.     Move(scr.rastport,xpos,ypos)
  291.     Text(scr.rastport,'_',1)
  292.     Delay(15)
  293.     Move(scr.rastport,xpos,ypos)
  294.     Text(scr.rastport,' ',1)
  295.     Delay(15)
  296. ENDFOR
  297. ENDPROC
  298.  
  299. PROC prompt(xpos,ypos)
  300. Move(scr.rastport,xpos,ypos)
  301. Text(scr.rastport,'C:\\>',4)
  302. ENDPROC
  303.  
  304.